<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <script src="./Cesium/Cesium.js"></script>
  <link rel="stylesheet" href="./Cesium/Widgets/widgets.css" />
  <style>
    html,
    body {
      padding: 0px;
      margin: 0px;
    }
  </style>
</head>

<body>
  <div id="cesiumContainer"></div>
  <script>
    Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0MzJiNzYwNC1lNjNkLTQxNTctOGRmMi1hYWI0YzdmNzU5NjciLCJpZCI6MTIwMjYwLCJpYXQiOjE2NzI4MjE1NTZ9.92plPvDAcuXNNGm2-NsbEMdODDP9bYVnmlNsAtUsD8g";
    // bilibili视频地址 https://www.bilibili.com/video/BV1nd4y19775?p=9
    const viewer = new Cesium.Viewer("cesiumContainer", {
      baseLayerPicker: false, //  隐藏默认的地图按钮，否则会影响新地图的加载
      terrainProvider: new Cesium.CesiumTerrainProvider({  // 加载地形数据，搜索 珠穆朗玛峰,查看山川地形效果
        url: Cesium.IonResource.fromAssetId(1),
        // url: Cesium.IonResource.fromAssetId(3957),
        requestVertexNormals: true,   // 设置为true,可以增加法线，用于提高光照效果，
        requestWaterMask: true,   // 设置为true,可以增加水面特效
      }),
    });
    // 加载夜晚的地球
      const layer = viewer.imageryLayers.addImageryProvider(
        new Cesium.IonImageryProvider({ assetId: 3812 })
      );

  </script>
</body>

</html>